package com.kmxd.ams.client.logs.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 档案利用日志
 *
 * @author nickbi
 * @since 2022-12-27
 */
@Data
@Schema(description = "档案利用日志对象")
public class LogArchiveUseVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @Schema(description = "公司ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long comId;

  @Schema(description = "全宗ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long fondsId;

  @Schema(description = "部门ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long deptId;

  @Schema(description = "部门名称")
  private String deptName;

  @Schema(description = "操作人IP地址")
  private String ip;

  @Schema(description = "操作")
  private String op;

  @Schema(description = "用户id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long userId;

  @Schema(description = "操作人代码")
  private String userCode;

  @Schema(description = "操作人名称")
  private String userName;

  @Schema(description = "档案类型")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archTypeId;

  @Schema(description = "档案类型名称")
  private String archTypeName;

  /** 表名 */
  @Schema(description = "表名")
  private String tableId;

  @Schema(description = "档案主键")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archId;

  @Schema(description = "题名")
  private String archTitle;

  @Schema(description = "年度")
  private Integer year;

  @Schema(description = "利用方式")
  private String userType;

  @Schema(description = "利用目的")
  private String purpose;

  @Schema(description = "来源")
  private String source;

  @Schema(description = "效果")
  private String effect;

  @Schema(description = "授权信息")
  private String authorize;

  @Schema(description = "1：项目；2：案卷；3：文件；4：盒")
  private Integer objectType;

  @Schema(description = "日志安全等级：0低，1中，2高，3高危")
  private Integer level;

  @Schema(description = "操作时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "备注")
  private String remarks;
}
